﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Taobao.Tools2.Domain.EntityFramework.Mappings;

namespace Taobao.Tools2.Domain.EntityFramework
{
    public class SenderMapping:ModelMapping<Sender>
    {
        public SenderMapping()
            : base()
        {
            Map(d => d.ToTable("Sender"));
            Property(c => c.AreaID).HasColumnName("AreaID");
            Property(c => c.Address).HasColumnName("Address");
            Property(c => c.Name).HasColumnName("Name");
            Property(c => c.Zip).HasColumnName("Zip");
            Property(c => c.Phone).HasColumnName("Phone");
            Property(c => c.Mobile).HasColumnName("Mobile");
            Property(c => c.CompanyCode).HasColumnName("CompanyCode");
            
            Property(c => c.ID).HasColumnName("SenderID").HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.DatabaseGeneratedOption.None);
            HasKey(c => c.ID); 

            //HasRequired<Shop>(c => c.Shop).WithRequiredPrincipal();
        }
    }
}
